<template>
	<view>
		<text class="box">这是子组件</text>
		<view>{{msg}}</view>
		<view>
			<button @click="transfer">点击切换标题</button>
		</view>
	</view>
</template>

<script>
	export default {
		props:['msg'],
		name:"child",
		data() {
			return {
				
			};
		},
		methods:{
			transfer(){
				this.$emit('childEvent', '你好呀!')
				
				uni.$emit('getInfo','见到你很开心')
			}
		}
	}
</script>

<style scoped>
	.box{
		color: red
	}
</style>
